package com.kurt.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 车辆扩展表
 * 存储车辆的额外信息，如品牌、型号、颜色、年份、里程数等
 * 与sys_vehicle表一对一关联
 */
@Data
@Entity
@Table(name = "sys_vehicle_extension")
@EqualsAndHashCode(callSuper = true)
public class SysVehicleExtension extends BaseEntity {

    @Id
    @Column(name = "id")
    private Long id; // 车辆ID，与sys_vehicle.id一致

    @Column(name = "brand", length = 50)
    private String brand; // 品牌

    @Column(name = "model", length = 50)
    private String model; // 型号

    @Column(name = "color", length = 20)
    private String color; // 颜色

    @Column(name = "year")
    private Integer year; // 年份

    @Column(name = "sort_order", nullable = false)
    private Integer sortOrder; // 排序

    @Column(name = "mileage", precision = 10, scale = 2)
    private BigDecimal mileage; // 里程数

    @Column(name = "custom_field1", length = 255)
    private String customField1; // 自定义字段1

    @Column(name = "custom_field2", length = 255)
    private String customField2; // 自定义字段2

    @Column(name = "custom_field3", length = 255)
    private String customField3; // 自定义字段3

    @Column(name = "organization_id")
    private Long organizationId; // 组织ID

}
